﻿@{
    ViewBag.Title = "ZTree";
}
<script src="@Url.Content("~/Scripts/ztree/JQuery_zTree_v3.5/js/jquery.ztree.core-3.5.js")" type="text/javascript"></script>
<link rel="stylesheet" href="@Url.Content("~/Scripts/ztree/JQuery_zTree_v3.5/css/zTreeStyle/zTreeStyle.css")" type="text/css">
<script type="text/javascript">
    var setting = {};
    var zNodes = [
    { name: "父节点1 - 展开", open: true,
        children: [
					{ name: "父节点11 - 折叠",
					    children: [
							{ name: "叶子节点111" },
							{ name: "叶子节点112" },
							{ name: "叶子节点113" },
							{ name: "叶子节点114" }
						]
					},
					{ name: "父节点12 - 折叠",
					    children: [
							{ name: "叶子节点121" },
							{ name: "叶子节点122" },
							{ name: "叶子节点123" },
							{ name: "叶子节点124" }
						]
					},
					{ name: "父节点13 - 没有子节点", isParent: true }
				]
    }
    ];
    $(function () {
        $("#myTree")
        $.fn.zTree.init($("#myTree"), setting, zNodes);
    });
</script>
<ul id="myTree" class="ztree">
</ul>
